﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;

namespace Ruleweaver.Conditions
{
	[ContractClass(typeof(IConditionSchemaContract))]
	public interface IConditionSchema
	{
		Specification<T> GetSpecification<T>(T target, string conditionName);
	}

	[ContractClassFor(typeof(IConditionSchema))]
	internal abstract class IConditionSchemaContract : IConditionSchema
	{
		Specification<T> IConditionSchema.GetSpecification<T>(T target, string conditionName)
		{
			Contract.Requires(conditionName != null);
			Contract.Ensures(Contract.Result<Specification<T>>() != null);

			return null;
		}
	}
}